package vno.fux.task
{
	import vno.fux.ui.UiLayer;

	public class CommandInterpreter
	{
		public static var ui:UiLayer;
		private static var _switches:Array;
		public function CommandInterpreter(switches_:Array)
		{
			throw new Error;
		}
		
		internal static function setSwitches(switches_:Array):void
		{
			_switches = switches_;
		}
		
		internal static function show(params:String):void
		{
			ui.showWindow(params);
		}
		
		internal static function switchOn(params:String):void
		{
			var indexes:Array = params.split(",");
			for each(var index:int in indexes)
			{
				_switches[index] = true;
			}
		}
		
		internal static function switchOff(params:String):void
		{
			var indexes:Array = params.split(",");
			for each(var index:int in indexes)
			{
				_switches[index] = false;
			}
		}
	}
}